from flask import Flask, jsonify, request
import registerServeToGateWay

app = Flask(__name__)


@app.route('/userinfo', methods=['POST'])
def hello_world():
    data = request.data.decode("utf-8")
    res = {"code": 200, "msg": "success", "data": "hello world"}
    return jsonify(res)


@app.route('/hello', methods=['GET'])
def hello_world1():
    res = {"code": 200, "msg": "success", "data": "hello world1"}
    return jsonify(res)


if __name__ == '__main__':
    registerServeToGateWay.start()
    app.run(host='192.168.100.60', port=5000, debug=True)
